package com.company.class11.Inter;

/**
 * @Classname InterTest
 * @Description 类型说明
 * @Date 2022/5/7 0:42
 * @Created by zbw
 */

public class InterTest {
    public static void main(String[] args) {
        USbDevice usb = new USbDevice() {
            @Override
            public void supplyPower() {
                System.out.println("能够供电");
            }

            @Override
            public void transferData() {
                System.out.println("能传数据");
            }

            @Override
            public void fix(String function) {

            }
        };

        usb.fix("zbw");
        usb.supplyPower();
        usb.transferData();
        //接口的静态方法是不能用实现类的实例化对象来调用的
//        usb.watch();
        //只能用接口类名调用
        USbDevice.watch();

    }
}
